package com.cpr.demo.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author Chen Panrui
 * created at 2022/3/17 20:09
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class CprUserDto {

    private Long id;
    private String name;

    public CprUserDto(Long id, String name){
        this.id = id;
        this.name = name;
    }

    // **** 非数据库字段

    private Long maxId;

    public static CprUserDto buildParam(Long maxId){
        CprUserDto dto = new CprUserDto();
        dto.setMaxId(maxId);
        return dto;
    }

}
